<template>
  <div>
      <head-top
        :title="navBarTitle"
        :rightText="navBarRightText"
        :rightEvent="true"
        v-on:rightClickEvent="rightClick"
      ></head-top>
      <product-edit ref="productEditRef"  :list-item-code="Number($route.params.type)"></product-edit>
  </div>
</template>

<script>
import HeadTop from "@/components/HeadTop"
import ProductEdit from "@/components/product/edit";
export default {
  components: {
    ProductEdit,
    HeadTop,
  },
  name: "ProductViewEdit",
  data() {
    return {
      navBarTitle: this.$route.params.type == this.GLOBAL.listItemType.product.toStorage ? '编辑拟入库商品' : '编辑正式入库商品',
      navBarRightText:'完成',
      rightRouter: this.GLOBAL.pathSetting.product.main,
    };
  },
  methods: {
    rightClick() {
      this.$refs.productEditRef.editProduct()
    },
    onSwiperRight() {
      this.$router.go(-1)
    }
  },
};
</script>
<style scoped>
</style>
<style>
</style>